import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import AmountItem from "./index";

const meta = {
  title: "样式原子组件/业务流程数据组件-AmountItem",
  component: AmountItem,
  tags: ["autodocs"],
  argTypes: {
    primaryColor: {
      control: "color",
    },
  },
  decorators: [
    (Story) => (
      <div style={{ backgroundColor: "#06112B" }}>
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof AmountItem>;

export default meta;
type Story = StoryObj<typeof meta>;

export const sup: Story = {
  args: {
    title: "销售合同",
    amount: 49.21,
    unitName: "万元",
    primaryColor: "#76ACF6",
    imgProps: {
      src: "https://test-ymsl.kxgcc.com:30195/public/website/cockpit/%E8%AE%A2%E5%8D%95%E4%B8%ADpng.png",
    },
  },
};

export const pur: Story = {
  args: {
    title: "采购合同",
    amount: 149.21,
    unitName: "万元",
    primaryColor: "#62BB93",
    imgProps: {
      src: "https://test-ymsl.kxgcc.com:30195/public/website/cockpit/订单.png",
    },
  },
};
